%% Phase diagrams and trajectories within the corrugation
clear all; close all;
%%%%%%%%%%%%%%%%%%%% root
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
root = 'D:\';
%%%%%%%%%%

load([root,'Compilation DiodeNatCom\figure 3\PhaseSpace.mat'])
i_sim = [1,2,3];

for i=i_sim
   hFig{i} = figure('color',[1,1,1],'Units','Centimeters','Position',[5+5*i,5,4,4]); hold on;
   ax = axes('Units','centimeters','Position' , [0, 0, 4, 4]);
   imagesc(PhaseSpace(i).C{2},PhaseSpace(i).C{1},log(PhaseSpace(i).N));
   colormap('bone');
   hold on; 
   plot(PhaseSpace(i).Utraj,PhaseSpace(i).Xtraj,'color',1/0.7*[0.7,0.2,0.7],'LineStyle','none','Marker','.','MarkerSize',2);
end